package week9;

public class capacityDemo {
    public static void main(String[] args) {
        //StringBuffer b = new StringBuffer();//初始分配空间为0+16
        StringBuffer b = new StringBuffer("A");//初始分配空间为1+16=17
        for(int i = 0; i < 50; i++){
            b = b.append("A");
            System.out.print(b);
            System.out.println(b.capacity());
        }
    }
}
